// 配置文件
let domain, imDomain, imWsDomain, domainAddress;

// 微信公众号的appId;  小程序appId配置在 manifest.json ->  mp-weixin -> appid
const mpAppId = "wx279d0eb6f22e0379";

// 图片域名
const picDomain = "https://mall-1312577323.cos.ap-chengdu.myqcloud.com/";

// if (process.env.NODE_ENV === "production") {
//   // 统一接口域名
//   domain = "http://192.168.1.48:8086";
//   // 客服api
//   imDomain = "http://192.168.1.48:8086/";
//   // 客服ws
//   imWsDomain = "http://192.168.1.48:8086/";
//   // 移动端域名地址配置-用于分享时跳转链接
//   domainAddress = "http://192.168.1.48:8086/";
// }
//
// if (process.env.NODE_ENV === "development") {
//   domain = "http://192.168.1.48:8086";
//   // domain = 'http://127.0.0.1:8086'
//   imDomain = "http://192.168.1.48:8086/";
//   imWsDomain = "http://192.168.1.48:8086/";
//   // 移动端域名地址配置-用于分享时跳转链接
//   domainAddress = "http://192.168.1.48:8086/";
// }

// =============== 生产环境 ===============
if (process.env.NODE_ENV === "production") {
  // 统一接口域名
  domain = "https://mall-api.cqone.cn";
  // 客服api
  imDomain = "https://mall-im.cqone.cn";
  // 客服ws
  imWsDomain = "wss://mall-im.cqone.cn";
  // 移动端域名地址配置-用于分享时跳转链接
  domainAddress = "https://mall-h5.cqone.cn";
}

// =============== 开发环境 ===============
if (process.env.NODE_ENV === "development") {
  domain = "https://mall-api.cqone.cn";
  // domain = 'http://127.0.0.1:8086'
  imDomain = "https://mall-im.cqone.cn";
  imWsDomain = "wss://mall-im.cqone.cn";
  // 移动端域名地址配置-用于分享时跳转链接
  domainAddress = "https://mall-h5.cqone.cn";
}

exports.mpAppId = mpAppId;
exports.picDomain = picDomain;
exports.domain = domain;
exports.imDomain = imDomain;
exports.imWsDomain = imWsDomain;
exports.domainAddress = domainAddress;
